home *** CD-ROM | disk | FTP | other *** search
/ Utilities Professional 1-1500 / Utilities Professional 1-1500 (1994)(WPD)[!].iso / 12511500 / var1453.dms / var1453.adf / Hardware / Hardware.doc < prev    next >
Text File  |  1992-05-02  |  19KB  |  510 lines

  1. 1    AMIGA HARDWARE
  2.  
  3. 1.1  INTRODUCTION
  4.  
  5. This chapter is intended to give you a brief introduction
  6. of the Amiga and its hardware. 
  7.  
  8.  
  9.  
  10. 1.2  AMIGA MODELS
  11.  
  12. The first Amiga model was released in the middle of 1985 and
  13. caused much publicity. It was the first "home" computer with
  14. a so called "multi media architecture" (it can combine raw
  15. data with astonishing graphics and stereo sound) and it was
  16. using a new operating system with true multi-tasking (several
  17. programs/tasks can run at the same time).
  18.  
  19. Although it was far superior to other available computers on
  20. the marked, it did not sell as good as could be expected. The
  21. main problem was, as with all new computers, that there did
  22. not exist any software that used the special features which
  23. the Amiga offered. The Amiga was expensive (although just a
  24. fraction of a similar computer would cost), and most software
  25. was simply "ported" from other computers and were therefore
  26. extremely bad. (Who wants to work with an Amiga which feels
  27. like an Atari or PC?)
  28.  
  29. However, slowly more and more programs were written specially
  30. for the Amiga and people started to realize what the Amiga
  31. really could do (and what other computers could not do). Two
  32. new models (A2000 and A500) were released with even more
  33. features and with a more attractive price tag.
  34.  
  35. Now everything started to accelerate. More people bought an
  36. Amiga and therefore more programmers started to write software
  37. for it, which encouraged even more people to buy it and so
  38. on... During 1989 and 1990 the Amiga community grew so fast
  39. that it became the best selling home computer.
  40.  
  41. The success has continued since then, despite what all so called
  42. "professional" programmers have said. The Amiga has constantly
  43. been looked down on by the rest of the computer world, accusing
  44. it for being a game machine. The problem is that they do not
  45. understand that a computer that can play stunning games with
  46. stereo sound and fantastic graphics must have a computer power
  47. far beyond other so called "professional" computers which hardly
  48. could handle graphics not to mention sound.
  49.  
  50. The attitude towards sound and graphics have luckily slowly
  51. changed, and now these so called "professional" people start
  52. to dream about operating system which offers good graphics, and
  53. maybe even some sound. I do not think we shall tell them that
  54. this already existed 1985, with true multi-tasking, on a machine
  55. which in their opinion "only" could play games...
  56.  
  57.  
  58.  
  59. 1.2.1  AMIGA 1000
  60.  
  61. The Amiga 1000 was the first Amiga model, and was released
  62. in the middle of 1985. The very first models were sold with
  63. only 256 KB of memory, but this was soon changed to 512 KB.
  64. At that time, this amount of memory was considered to be a
  65. lot, but most people using the Amiga realized that more,
  66. actually a lot more, could sometimes be needed.
  67.  
  68. The Amiga 1000 consists of a main box (a bit smaller that
  69. the box of the A200) with a separate keyboard. It uses
  70. a 7 MHz Motorola 68000 processor (see below for more
  71. information), and came with DOS V1.0 and V1.1 (some are
  72. even using V1.2 and V1.3). This model is still used by some
  73. people, but more and more are switching over to newer models,
  74. or changing the mother board so it becomes very similar to an
  75. Amiga 2000. Most new programs does not support this model any
  76. more.
  77.  
  78.  
  79.  
  80. 1.2.2  AMIGA 2000
  81.  
  82. Two new models of the Amiga were released 1987/88 - Amiga 2000
  83. and Amiga 500. The A2000 was intended for the more professional
  84. part of the Amiga community. The main box contains five large
  85. slots (100 pins) and two smaller ones (intended for IBM PC
  86. cards), in total seven slots. To each slot you may connect
  87. external devices like hard disks, extra memory, internal
  88. modems, etc... 
  89.  
  90. Both the A2000 and A500 were released together with DOS V1.2,
  91. and was later upgraded to V1.3. It is now also possible to buy
  92. the new chips for V2.0.
  93.  
  94. Both computers are sold with 512 KB of memory (so called "chip
  95. memory"). When upgraded the next 512 KB of memory is called
  96. "slow memory" and the rest (up to 8 MB) is called "fast".
  97. The Amiga's special chips (see below) can only reach the "chip
  98. memory", hence the name, while the main processor (the 68000)
  99. can reach all 9 MB. The 512 KB above the "chip memory" is called
  100. "slow memory" since the main processor may be interrupted by
  101. the custom chips while working with this memory type, and this
  102. memory is therefore not always as fast as the rest.
  103.  
  104. The later models of the Amiga 2000 are sometimes called
  105. "2000C". This is because they have 1 MB of chip memory instead
  106. of only 512 KB as previous models.
  107.  
  108.  
  109.  
  110. 1.2.3  AMIGA 500
  111.  
  112. The smaller model is almost identical to its big brother A2000,
  113. but does not have any internal expansion slots. The keyboard
  114. and the computer are built together. It has only one (external)
  115. expansion slot on the left side and a small internal expansion
  116. slot for 512 KB of extra memory. This model is much cheaper than
  117. the A2000 and was intended to become a home computer for the
  118. family, which it one year later became.
  119.  
  120. Many people thinks that the A2000 is far superior to the small
  121. A500, but this is actually not true. As said above, the only
  122. difference between these two models are that it is easier to
  123. expand (add on extra devices) an A2000, and that it has a
  124. separate keyboard. The rest is identical.
  125.  
  126.  
  127.  
  128. 1.2.4  AMIGA 3000
  129.  
  130. The Amiga 3000 is currently the most powerful model. It comes
  131. with a Motorola 68030 processor which is boasted with a 16 or
  132. 25 MHz mathematical coprocessor. All Amiga 3000s are sold with
  133. an internal hard disk of various sizes. This model comes with
  134. the latest version of the operating system V2.0 (explained
  135. below). 
  136.  
  137. This model comes with the new "Enhanced Chip Set" (ECS) and
  138. can address up to 2 MB of chip memory. On the mother board
  139. can up to 16 MB be installed, and if using one of the slots
  140. up to 1 Gigabyte can be used. This is a mean machine!
  141.  
  142.  
  143.  
  144. 1.2.5  AMIGA 500+
  145.  
  146. This is a new version of the Amiga 500. It comes also with the
  147. new "Enhanced Chip Set" (ECS) and can address up to 2 MB of
  148. chip memory. This model is also sold with the new V2.0 operating
  149. system.
  150.  
  151. It still uses the old and trusted 68000 processor, but is still
  152. a nice update from the Amiga 500.
  153.  
  154.  
  155.  
  156. 1.2.6  AMIGA 600
  157.  
  158. The latest model is the Amiga 600. This machine comes in a much
  159. smaller box than the Amiga 500, and does not have any numeric
  160. key pad. This will definitely cause some problems with programs
  161. that are using these keys. However, this model is easier to
  162. take to your friends, and will probably be cheaper in the end.
  163.  
  164. The Amiga 600 does not have the famous expansion slot on the
  165. left side as the Amiga 500 and Amiga 500+ have. Instead there
  166. is a new type of slot which is made for "electronic credit
  167. cards". These small cards can contain programs, games, extra
  168. memory up to 8 MB, and a lot of other useful stuff like sound
  169. samplers and video digitizers.
  170.  
  171. Since there is no expansion bus on this model you can not
  172. connect existing hardwares like hard disk, and memory
  173. expansion slots to it. This is sad, but since the Amiga 600
  174. can use an internal hard disk I do not think this cause any
  175. problems.  
  176.  
  177. This model will definitely be called a "game machine", and will
  178. will undoubtedly appeal to many families who previously used
  179. game consoles. 
  180.  
  181.  
  182.  
  183. 1.2.7  FUTURE MODELS
  184.  
  185. Everything is changing these days, and so is the Amiga. It is
  186. impossible to say what is coming next, but I would not mind
  187. an Amiga "4000" with 68040 processor, 1 Gigabyte hard disk, 16-
  188. bit stereo sound channels and a 24-bit graphics cards with
  189. built in genlock... One thing is sure at least, the Amiga will
  190. continue to live, more than ever.
  191.  
  192.  
  193.  
  194. 1.3  PROCESSORS AND SPECIAL CHIPS
  195.  
  196. The main processor on the Amiga is not specially strong or
  197. powerful, but together with several coprocessors (extra
  198. processors) which are specialized in doing certain things very
  199. fast, the Amiga can do things other computers can not.
  200.  
  201. The main processor on the Amiga is a Motorola 680x0. The famous
  202. coprocessors are called ("Fat") Agnus, Paula, and Denise. These
  203. chips are close linked to each other and can only work with
  204. "chip memory" (explained below). These coprocessors are often
  205. referred as the "custom chips".
  206.  
  207.  
  208.  
  209. 1.3.1  MOTOROLA MC680X0 PROCESSORS
  210.  
  211. The main processor on all Amiga models except the Amiga 3000,
  212. is a simple Motorola 68000 with only 7 MHz. This is a very
  213. good processor although it is not very fast. This processor can
  214. physically address up to 16 MB, although the "maximum" on the
  215. Amiga is 8 MB.
  216.  
  217. There exist newer models which are faster, and the nice thing
  218. is that all these new versions can be used by the Amiga. The
  219. first step up is the 68010, which is a bit faster than the
  220. previous model. However, it costs more than it gives in speed,
  221. and a faster 68000 in 14 MHz gives more value for money.
  222.  
  223. The 68020 is a fast processor which is fitted on many so called
  224. turbo cards. If you give it 32 bit memory it can be very fast.
  225.  
  226. The Amiga 3000 comes with a 68030 which is very fast. It can
  227. address up to 2 Gigabytes although the "maximum" on the Amiga is
  228. 1 Gigabyte. This processor is used together with either 16 MHz
  229. or a 25 MHz mathematical coprocessor to speed up the floating
  230. calculations.
  231.  
  232. The latest Motorola processor is the 68040, which is (surprise)
  233. even faster. 
  234.  
  235. If you intend to do a lot of calculations a fast processor is
  236. essential. It should be noted that a faster processor does not
  237. necessarily increase the overall speed that much. To take
  238. advantage of the new versions you also need to use 32-bit
  239. memory instead of the slower 16-bit memory. Most new turbo
  240. cards comes both with a faster processor and 32-bit memory.
  241.  
  242. Mathematical coprocessors like the 68881 or 68882 are great
  243. if you have to do a lot of floating calculations. Although all
  244. programs does not make use of these extra coprocessors most
  245. "serious" programs do.
  246.  
  247.  
  248.  
  249. 1.3.2  BLITTER
  250.  
  251. The "Blitter" is a part of the Agnus chip. It is specialized
  252. in moving data, and can even do logically calculations and bit-
  253. shifting while the data is moved. It is the Blitter which is
  254. used when BOBs are drawn, data from and to the disks are
  255. transferred, when windows are moved etc... The Blitter can also
  256. be used to draw lines with patterns and fill areas with a
  257. colour or pattern.
  258.  
  259.  
  260.  
  261. 1.3.3  COPPER
  262.  
  263. The Copper is a part of the coprocessors on the Amiga which
  264. main task is to change colours and display modes while the
  265. picture is "drawn" on the monitor/TV. It is because of the
  266. Copper you can use several screens on the same display and drag
  267. them up or down.
  268.  
  269. The Copper is also used to increase the number of colours on
  270. the display by making colourful backgrounds with smoothly
  271. coloured skies. Furthermore, the Copper can be used to
  272. synchronize other parts of the Amiga like the Blitter, and
  273. can be used as a timer.
  274.  
  275.  
  276.  
  277. 1.3.4  AUDIO CHANNELS
  278.  
  279. There exist four audio channels on the which each can play
  280. sounds independently of the other processes. They convert 8-bit
  281. data into analog waveforms which are sent to the two audio
  282. ports. Since two of the channels are dedicated for the left
  283. port and the other two channels for the right port can stereo
  284. sound be played.
  285.  
  286. You only have to give the audio channels some digital waveforms
  287. or sampled data, tell them which rate and volume should be used,
  288. and they can play the sound without using any other processing
  289. time. No other home computer have yet matched the quality nor
  290. the efficiency with which the Amiga plays sound.
  291.  
  292.  
  293.  
  294. 1.3.5  HARDWARE SPRITES
  295.  
  296. The sprite hardware is a part of the custom chips. It can
  297. handle eight hardware sprites which can independently of the
  298. display below be moved around and animated. Each sprite can
  299. only use four colours where one is transparent, but if they
  300. are paired up to 16 colours can be used.
  301.  
  302. Since these sprites are handled by the hardware are they
  303. extremely fast but also simple to use. With some clever
  304. software routines can the eight hardware sprites be used
  305. several times on the same display thus greatly increase the
  306. number of available sprites.
  307.  
  308. The sprite hardware can also be used to detect collisions
  309. between two sprites, something which can be very useful in
  310. games.
  311.  
  312.  
  313.  
  314. 1.3.6  COMPLEX INTERFACE ADAPTOR (CIA)
  315.  
  316. To tie all processors and other hardware parts there exist two
  317. so called "Complex Interface Adaptors" (CIA - 8520) chips.
  318. These two chips several timers, status bits etc... See header
  319. file "hardware/cia.h" for a full list.
  320.  
  321. Normally should a C programmer not go this deep into the
  322. system, but it is acceptable as long as you do it with help of
  323. the macros and constants defined in the header files. A lot of
  324. fun and useful stuff like flashing with the power led can be
  325. done.
  326.  
  327.  
  328.  
  329. 1.3.7  DMA
  330.  
  331. DMA stands for "Direct Memory Access" which means that the
  332. hardware can directly get and store data in the memory without
  333. going through the main processor. For example; each audio
  334. channel has a DMA port and thus can each channel play waveforms
  335. continuously without disturbing other processes.
  336.  
  337. Most parts of the Amiga (the blitter, sprite hardware, copper,
  338. audio channels etc..) have separate DMA channels/ports. Each
  339. process can then very efficiently execute their tasks without
  340. interfering or disturbing other parts.
  341.  
  342.  
  343. 1.3.8  THE ENHANCED CHIP SET
  344.  
  345. The custom chips have several times been updated. The latest
  346. version is called the "Enhanced Chip Set", and the chips can
  347. address up to 2 MB of chip memory. These new chips also offers
  348. new display modes and other nice things. I will cover this
  349. subject in the next version of the manual. (Hopefully very
  350. soon...)
  351.  
  352.  
  353.  
  354. 1.4  AMIGA DOS V2.0
  355.  
  356. The new operating system V2.0 (2.05 and 2.05) has been out for
  357. quite a while now. With this new version comes a new ROM chip
  358. on 512 KB which replaces the old "Kick Start" of only 256 KB. 
  359. A lot of things have been added which will be covered in the
  360. next version. I am sad that I could not manage to include it in
  361. this edition, but do not worry, it is coming soon!
  362.  
  363.  
  364.  
  365. 1.5  MEMORY
  366.  
  367. The Amiga is using different types of memory, and it can
  368. sometimes be rather confusing. The problem is that some of
  369. the coprocessors can only use one type of memory while the
  370. main processor can use all types. It is best to give a short
  371. explanation.
  372.  
  373.  
  374.  
  375. 1.5.1  CHIP
  376.  
  377. The so called "chip" memory is the only type of memory that can
  378. be used by the custom chips on the Amiga. Anything that should
  379. be used by the Blitter, Copper, Sprite Hardware, Audio Channels
  380. etc... must be in chip memory.
  381.  
  382. The first Amiga models had 512 KB of chip memory. Later the
  383. Amiga 2000C was released with 1 MB of chip memory. The newest
  384. versions, Amiga 3000, Amiga 500+, Amiga 600, can all access up
  385. to 2 MB of chip memory.
  386.  
  387. The more chip memory you have the more graphics, sounds,
  388. sprites etc can be used. If your program does not necessarily
  389. have to use chip memory should you instead first try to use
  390. other types of memory. This is explained in the first
  391. introduction chapter of the manual.
  392.  
  393.  
  394.  
  395. 1.5.2  SLOW
  396.  
  397. The so called "slow" memory exists only on old Amiga 500 and
  398. Amiga 2000 models. These models can only access 512 KB of chip
  399. memory. The following 512 KB can not be used by the custom
  400. chips, but the memory can still be interrupted by the custom
  401. chips. If the Amiga is using a lot of graphics or sound this
  402. memory is often interrupted and therefore will all operations
  403. with this type of memory be a bit slower.
  404.  
  405.  
  406.  
  407. 1.5.3  FAST
  408.  
  409. The following 8 MB (or more if you have an Amiga 3000) are of
  410. the type "fast memory". This memory can only be accessed by the
  411. main processor, and will not be interrupted by the custom
  412. chips.
  413.  
  414.  
  415.  
  416. 1.6  HIT THE HARDWARE
  417.  
  418. Normally should all operations be made by the special functions
  419. which are included in the libraries. You can then be sure that
  420. your program will run without problems on even future models.
  421. However, sometimes can it be necessary to directly modify the
  422. hardware registers. If speed is essential or you want to write
  423. a small and simple program you may use parts of the hardware.
  424.  
  425. The problem when you are using the hardware directly is that if
  426. a new Amiga model is released it may happen that the resources
  427. have been moved to a new location. The functions in the
  428. libraries are always updated when the system is changed so any
  429. program that is using these functions will continue to run as
  430. before. However, programs that hit the hardware may crash on
  431. the new system!
  432.  
  433. To use the hardware and still be relative safe you should use
  434. two special global structures:
  435.  
  436.   1. The Custom structure.
  437.   2. The CIA structure.
  438.  
  439.  
  440.  
  441. 1.6.1  GET ACCESS TO THE CUSTOM CHIPS
  442.  
  443. The Custom structure is defined in header file "hardware/
  444. custom.h". It is a very large structure that contains many of
  445. the custom chips' hardware registers. This structure is 
  446. automatically linked to the custom chips, and any modifications
  447. in the structure will directly affect the hardware registers.
  448.  
  449. To get access to the Custom structure you should write like
  450. this: (The name must be "custom"!)
  451.  
  452.   extern struct Custom far custom;
  453.  
  454.  
  455. You can now start to modify the values in the custom structure,
  456. but still be relative safe that your program will continue to
  457. run on later Amiga models. See the header files and the
  458. included examples for more information about how to use these
  459. registers.
  460.  
  461. Note that some of these registers should be "reserved" and
  462. "locked" before you may start to alter them. See chapter
  463. "AudioiDevice" for more information. You can of course directly
  464. modify the values, but you may end up modifying other programs'
  465. values. This will normally not be any problems for the system,
  466. but the other program will definitely not like it.
  467.  
  468.  
  469.  
  470. 1.6.2  GET ACCESS TO THE CIA CHIPS
  471.  
  472. The CIA structure is automatically linked to the CIA chips.
  473. There exist two CIA chips and therefore it also exist two
  474. CIA structure (defined in the header file "hardware/cia.h"). To
  475. get access to these structures you should write like this: (The
  476. names must be "ciaa" and "ciab"!)
  477.  
  478.   extern struct CIA far ciaa;
  479.   extern struct CIA far ciab;
  480.  
  481. You can now start to use the CIA registers. See header files
  482. and included examples for more information about how eo use
  483. these registers.
  484.  
  485.  
  486.  
  487. 1.7  EXAMPLES
  488.  
  489. Example 1
  490.  
  491.   This fantastic useful program does what all true hackers have
  492.   dreamt of. Enjoy your Amiga's fantastic ability to flash one
  493.   LED!
  494.  
  495. Example 2
  496.   This is a very bad program that plays a tune with the first
  497.   audio channel. The reason why it is bad is because the
  498.   program does not "lock" the channel before it uses the
  499.   hardware. It simply steals the sound channel without asking
  500.   nor notifying anyone.
  501.  
  502.   If you lock the channel as described in the Audio Device
  503.   chapter you may use the hardware registers. However, this
  504.   program does not lock it nor tries to reserve the channels
  505.   as we should. The program is included here only as a
  506.   demonstration how the hardware registers are working, but
  507.   should not be used in your own programs!!!
  508.  
  509. See also programs in the chapter "DirtyInput".
  510.